package com.hhkj.api.course.controller;

import com.hhkj.api.course.service.biz.ApiSaleCourseBizService;
import com.hhkj.api.sale.common.session.model.LoginSale;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.framework.login.api.ApiLogin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ApiSaleCourseController
 *
 * @author HHKJ-SERVER-ZJ
 * @since 2023/10/31 17:47
 */
@RequestMapping("/api/sale/course")
@RestController
public class ApiSaleCourseController extends BaseController {

    @Autowired
    private ApiSaleCourseBizService courseBizService;

    /** 树形列表 */
    @ApiLogin(LoginSale.class)
    @GetMapping("/paid/second/level/tree/list")
    public TableDataInfo listSecondLevelTreePaid() {
        return getDataTable(courseBizService.listSecondLevelTreePaid());
    }

    /** 树形列表 */
    @ApiLogin(LoginSale.class)
    @GetMapping("/second/level/tree/list")
    public TableDataInfo listSecondLevelTree() {
        return getDataTable(courseBizService.listSecondLevelTree());
    }
}
